module.exports = {
    type:'list',
    async fetch({
        page,
        args
    }) {
        page = page || 1
        let resp = await $http.get(`http://lab.zuimeia.com/wallpaper/category/${page || ''}`)
        let list = resp.data.data.images
        let items = list.map(photo => {
            return {
                title: photo.description,
                style: "gallery",
                thumb:'http://wpstatic.zuimeia.com/'+photo.image_url,
                author: {
                    name: photo.pub_time+photo.description,
                },
                summary: photo.description,
                route: $route('@image', {
                    url:'http://wpstatic.zuimeia.com/'+photo.image_url,
                    date:photo.pub_time
                })
            }
        })
        return {
            nextPage: page + 1,
            items: items
        }
    }
}